<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Mouse Position</title>
		<link rel="stylesheet" href="../CSS/style.css">
	</head>

	<body>
		<h1>My page</h1>
		<canvas id="canvas" width="400" height="400"></canvas>
		<script src="../javascript/utils.js"></script>
		<script>
			window.onload = function () {	
				var utils = new Utility();
				var canvas = document.getElementById('canvas'), //define multi variable seperate with colon ','
				 	mouse=utils.captureMouse(canvas);
				canvas.addEventListener('mousedown', function () {
					console.log("x: " + mouse.x + ", y: " + mouse.y);
				}, false);
			};
		</script>
	</body>
</html>